{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Hurst exponent \n",
    "\n",
    "is a useful parameter in dealing with time-series. It is a measure of a time-series to either regress near a mean or to tend in a particular direction."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 临时添加到系统路径\n",
    "import sys\n",
    "sys.path.append('C:\\\\ProgramData\\\\Anaconda3\\\\envs\\\\TBQuant\\\\Lib\\\\site-packages')\n",
    "sys.path\n",
    "\n",
    "from hurst import compute_Hc, random_walk\n",
    "import pandas as pd"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "BTC\n",
      "ETH\n",
      "BNB\n",
      "XRP\n",
      "ADA\n"
     ]
    }
   ],
   "source": [
    "# df = pd.read_excel('./Crypto Pricing Data.xlsx', sheet_name='BTC', header=1) # header : which row to be column header, 1 means 2nd row in sheet.\n",
    "dct = pd.read_excel('./Crypto Pricing Data.xlsx', sheet_name=None, skiprows=1)\n",
    "for i in dct.keys():\n",
    "    print(i)\n",
    "#     .drop('x', axis=1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [],
   "source": [
    "H, c, val = compute_Hc(df['Close**'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYQAAAEOCAYAAACJlmBtAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAIABJREFUeJzt3XtcVHX+x/HXDMN9GBRRyQrTFPNaKpV28ZJprfuoNW8PbbWyUmvRrLYfXQWkLGSNMu9dNK28pevq1lZ23XRz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PBHUrExFxjkdcMqqPX3crC8jLo0x3GYmInFGzDwT4X7ey8PBwCvQggojIGTX7S0YiIuIcBYKIiAAKBBEROUWBICIigAJBREROUSCIiAigQBARkVMUCCIiAigQRETkFAWCiIgACgQRETlFgSAiIoCHBEJ9OqaJiIhzPGK10/p0TBMREed4xBmCiIi4ngJBREQABYKIiJyiQBAREUCBICIipygQREQEUCCIiMgpCgQREQEUCCIicorB4XA43F2EiIi4n0eeIZxtXaOz/eyxxx5zRTku0RhrNzXUMer6PufzOmf3Pdd+df25xo5rjtMYY8fZ/eu7T3P43eORgdC3b986/cyTNMafo6GOUdf3OZ/XObvvufar7889QWP9GRriOI0xdpzdv777NIex41WXjB577DGSkpLcXYZ4II0dqQ9PGT8eeYZQVzfeeKO7SxAPpbEj9eEp48erzhBERKR2XnWGICIitVMgiIgIoEAQEWlUlZWVfPXVVxw5csTdpfyOVwdCUVERSUlJ5ObmursU8SCffPIJW7ZsYdmyZe4uRTxQamoq7du3Z8uWLVRWVrq7nNM020AoKCggLi7utG2LFy/mySefZMOGDQDY7XY6dOjgjvKkiXJm3AwYMIBhw4ZRVlbmjhKlCXNm/ERHR5Obm0tVVRUmU9Nqa98sA6GkpISFCxdis9lqtn355ZdUVVUxe/Zsjh8/zrFjx2jZsiUGg8GNlUpT4uy4MZlMvPvuu9x8881urFaaGmfHT25uLt26dcPf35/i4mI3Vvx7zTIQjEYjDz30EIGBgTXb9u3bR//+/QG4/PLLOXDggLvKkybK2XHzr3/9i++//569e/ee9o9fvJuz4+eHH35g5cqVOBwOgoOD3VXuGTWt85UGEhQU9LttNpuNsLAwAMxmc82EztixYxu1Nmm6nB03I0aMYPjw4Y1dnjRxzo6fwYMH14REU9MszxDOJCAggPLycgDKysqoqqpyc0XiCTRupD48bfx4TSB07Nix5jJReno6bdq0cXNF4gk0bqQ+PG38eE0gXHnllWzdupUVK1awfft2+vTp4+6SxANo3Eh9eNr48aq1jEpKStizZw/dunWjRYsW7i5HPITGjdSHJ40frwoEER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JCZmUm7du0a9M8g3kXPIYiICKBLRiIicooCQUREAAWCiIicokAQERFAgSAiIqcoEEREBFAgiIjIKQoEEREB4P8BDXF4G2fGzlgAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "import matplotlib.pyplot as plt\n",
    "# 设置字体 用来正常显示中文标签\n",
    "plt.rcParams['font.sans-serif'] = ['SimHei']\n",
    "# 用来正常显示负号\n",
    "plt.rcParams['axes.unicode_minus'] = False\n",
    "# 图表主题\n",
    "plt.style.use('ggplot')\n",
    "\n",
    "axes = plt.subplots()[1]\n",
    "axes.plot(val[0], c*val[0]**H, color=\"blue\")\n",
    "axes.scatter(val[0], val[1], color=\"red\")\n",
    "axes.set_xscale('log')\n",
    "axes.set_yscale('log')\n",
    "axes.set_xlabel('Time interval')\n",
    "axes.set_ylabel('Rescaled Range ratio')\n",
    "axes.grid(True)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.12"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
